<?php
	$this_post = $post;
	$category = get_the_category(); 
	$category = $category[0]; 
	$category = $category->cat_ID;
	$posts = get_posts('numberposts=5&offset=0&orderby=post_date&order=DESC&category='.$category);
	$count = 0;
	
	foreach ( $posts as $post ) 
	{
		if ( $post->ID == $this_post->ID || $count == 5) 
		{
			unset($posts[$count]);
		}
		else
		{
			$count ++;
		}
	}
	
	$post_count = 0;
?>

<?php if ( $posts ) : ?>
<div id="latest_area">
<h4>Related Posts</h4>
  <?php foreach ( $posts as $post ) : ?>
	  <?php
		$ibizmag_post_excerpt = $post->post_content;
		$ibizmag_postimg_100px = get_post_meta($post->ID, "ibizmag_postimg_100px", true);
	  ?>
	  <?php
	  if($post_count > 0)
	  {
	  ?>
	  <!--<div class="excerpt_separator"></div>-->
	  <?php
	  }
	  ?>
	  
	  <div class="excerpt_content">
		<!--<div class="excerpt_image"><img src="<?php echo $ibizmag_postimg_100px; ?>" width="100" height="100" /></div>-->
		<div class="excerpt_desc" style="width: 580px !important;">
		  <h4><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h4>
		  <?php //custom_excerpt($ibizmag_post_excerpt, 350); ?>
		  <!--<div class="box_read_more"> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">Read More</a> </div>-->
		</div>
	  </div>
	  
	  <?php $post_count++; ?>
  <?php endforeach // $posts as $post ?>
</div>
<?php endif // $posts ?>
<?php
	$post = $this_post;
	unset($this_post);
?>